$(function(){
	//alert("cool");
	$('#enter_chat').click(checkPlan);
	
	/*
	 * 检查该事件是否启动了预案
	 */
	function checkPlan(){
		//alert("yeah");
		var timestamp = Date.parse(new Date());
		var url = "/ag/zrt/checkPlan.action?ts="+timestamp;
		var data = {};
		//alert("done");
		$.post(url,data,function(data){
			if(data.result == "empty") {
				alert("当前事件没有启动预案");
			}else{
				alert("当前事件已启动预案,按确定进入平台");
				parent.window.location.href = "/ag/zrt/loadPlanStep.action";
			}
				
		});
		
	}
});